import store from '@/store';
import { defineStore } from 'pinia'
import { PostsVO } from "@/api/front/social/types";

const useSocialStore = defineStore('social', () => {
  let social = reactive<PostsVO>(<PostsVO>{})

  const setSocial = (value: PostsVO) => {
    
    Object.keys(value).forEach(key => {
      social[key] = value[key]
    })
  }
  return {
    social,
    setSocial
  }
})

export default useSocialStore